import { _decorator, Component, Node, Animation, Vec3, Label} from 'cc';

const { ccclass, property } = _decorator;

@ccclass('AnimationManager') // 用 @ccclass 声明类为 Cocos 组件
export class AnimationManager extends Component {
    // 通过 @property 让编辑器可以配置属性
    @property(Node) startAni: Node | null = null;
    @property(Node) upwardDeck: Node | null = null;

    @property(Node) cardAction: Node | null = null;
   

	static instance: AnimationManager;

    onLoad() {
        AnimationManager.instance = this;

    }

    static playGameStart() {
        AnimationManager.instance.startAni?.getComponent(Animation)?.play("GameStart");

    }

    static playUpwardDeck() {
        AnimationManager.instance.upwardDeck?.getComponent(Animation)?.play("UpwardDeck");

    }


}